var tableDemo=function(){
	var grid;
	var that;
	return {
		init:function(){
			that=this;
			grid=$("#tableGrid").datagrid({
					url:"/table/tableData.html",
					height:489,
					pagination:true,
					fitColumns:true,
					singleSelect:true,
					autoRowHeight:true,
					pageSize:14,
					pageList:[14],
					idField:"id",
					columns:[[
					          {checkbox:true},
					          {field:"id",title:"编号",width:50,align:"center"},
					          {field:"name",title:"名字",width:150,align:"center"}
						]],
					toolbar:[{
						iconCls:"icon-add",
						text:"增加",
						handler:function(){
							//showSaveFoodDialog();
						}
					},{
						iconCls:"icon-remove",
						text:"删除",
						handler:function(){}
					},{
						iconCls:"icon-edit",
						text:"修改",
						handler:function(){
						}
					},{
						iconCls:"icon-tip",
						text:"推荐",
						handler:function(){
						}
					},{
						iconCls:"icon-search",
						text:"搜索",
						handler:function(){
						}
					},{
						iconCls:"icon-cancel",
						text:"清除搜索条件",
						handler:function(){
						}
					}]
				});
		},
		renderStatus:function(rowdata, index, value){
			return "<a href='javascript:void(0);'>删除</a>";
		},
		itemclick:function(){

		}
	};
}
$(document).ready(function(){
	var demo=new tableDemo();
	demo.init();
});